package models;

import answers.IAnswer;
import answers.Response;
import mvc.AbstractModel;

public abstract class AbstractQuestion extends AbstractModel
{

	/*
	 * operations
	 */
	
	public AbstractQuestion(String name, String caption)
	{
		super(name, caption);
		permission = 0;
	}
	
	public AbstractQuestion(String name, String caption, double points)
	{
		super(name, caption);
		this.points = points;
		permission = 0;
	}

	
	public abstract String getCategory(); 
	
	public boolean hasAnswer()
	{
		return itsIAnswer != null;
	}
	
	public void setPosition(int position) 
	{
		this.position = position;
	}
	public int getPosition() 
	{
		return position;
	}
	public void setPoints(double points) 
	{
		this.points = points;
	}
	public double getPoints() 
	{
		return points;
	}
	public void setItsIAnswer(IAnswer itsIAnswer)
	{
		this.itsIAnswer = itsIAnswer;
	}
	public IAnswer getItsIAnswer()
	{
		return itsIAnswer;
	}
 
	public void setPermission(int permission)
	{
		this.permission = permission;
	}

	public int getPermission()
	{
		return permission;
	}

	protected int position;
	protected double points;
	protected IAnswer itsIAnswer = null;
	private int permission;
}
